package com.guangzi.service.impl;

import com.guangzi.mapper.TicketDao;
import com.guangzi.service.AbstractService;
import com.guangzi.service.TicketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TicketServiceImpl extends AbstractService implements TicketService {
    private TicketDao tickekDao;
    @Autowired
    public void setTickekDao(TicketDao tickekDao) {
        super.setBaseDAO(tickekDao);
        this.tickekDao = tickekDao;
    }

    @Override
    public void updateStatus(Byte status, Long kid) {
        if(status!=null && status==0){
            status=1;
        }else if(status!=null && status==1){
            status=0;
        }
        tickekDao.updateStatus(status,kid);
    }
}
